package com.itheima01;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Xiao
 * @date 2021/7/14
 */
public class CollectionDemo01 {
    /**
     * 集合进阶_Collection
     */
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("Hello");
        c.add("World");
        c.add("！");
        System.out.println(c);
        //[Hello, World, ！] → 重写了toString()方法
    }
}
